package edu.spec.dengyan.week07.class01.home1.work1;
/**
 * Author       : MadFrog
 * Date         : 2018/10/11 23:19
 * Description  : “中国人”类
 */
public class Chinese extends Human {
    // TODO 给language赋初值“普通话”
    private String language;    // 语言
    public Chinese(String language){
        this.language="普通话";
    }
    // TODO 默认构造方法，方法里实现输出打印“我是中国人，我很自豪。”
    public Chinese(){
        System.out.println("我是中国人，我很自豪。");
    }
    // TODO 自定义构造方法，参数对应4个成员变量的值，方法体完成4个成员变量的初始化
    public Chinese(String area,String mainFood,String skinColor,String language){
        super(area, mainFood, skinColor, language);
        this.area=area;
        this.mainFood=mainFood;
        this.skinColor=skinColor;
        this.language=language;
    }
    // TODO language的getter和setter

    @Override
    public String getLanguage() {
        return "普通话";
    }

    @Override
    public void setLanguage(String language) {
        this.language = language;
    }
    public void speak(){
        super.speak();
        System.out.println("我说" +getLanguage());
    }
    public void printLanguage(){
        super.printLanguage();
        System.out.println("我说"+this.language);
    }
}
